package com.cjx.springcloud.controller;

import com.cjx.springcloud.domain.CommonResult;
import com.cjx.springcloud.domain.Order;
import com.cjx.springcloud.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cjx
 * @date 2021/6/18 0018 - 23:16
 */
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order){
      orderService.create(order);
      return new CommonResult(200,"创建成功");
    }
}
